/**
 * 
 */
package com.tdkj.action.front.mall.shop;

import java.util.List;

import javax.annotation.Resource;

import com.tdkj.action.BaseAction;
import com.tdkj.model.shop.BeanShopNotice;
import com.tdkj.service.shop.IBeanShopService;

/**
 * @author yninfo
 */
public class NoticeAction extends BaseAction {
	
	private Long id ;
	
	private IBeanShopService shopService;
	
	private List<BeanShopNotice> notices;
	
	@SuppressWarnings("unchecked")
	public String execute(){
		
		notices = shopService.getBaseDao().getSession()
			.createQuery("from " + BeanShopNotice.class.getName() + " as bean where bean.user.id="+id).list();
		
		return "success";
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public List<BeanShopNotice> getNotices() {
		return notices;
	}

	public void setNotices(List<BeanShopNotice> notices) {
		this.notices = notices;
	}

	@Resource
	public void setShopService(IBeanShopService shopService) {
		this.shopService = shopService;
	}
	
	
}
